package com.zeroup.auto.assists.kt;

import android.util.Log;

import androidx.annotation.NonNull;

import com.alibaba.fastjson.JSON;

import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlinx.coroutines.Dispatchers;

public class MyContinuation implements Continuation<Unit> {
    @Override
    public void resumeWith(@NonNull Object o) {
        // 处理协程结果
        Log.d("===---->", JSON.toJSONString(o));
    }

    @NonNull
    @Override
    public CoroutineContext getContext() {
        return Dispatchers.getMain();// 在主线程中继续
    }
}
